﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace UpdaterForm.Converters
{
    [ValueConversion(typeof (int), typeof (bool))]
    public class IsItemSelected : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var selectedIndex = (int) value;
            return selectedIndex >= 0;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}